package com.canal.admin.service;

import com.canal.admin.exception.BuzException;
import com.canal.admin.transfer.req.item.ChannelItemAddReq;
import com.canal.admin.transfer.req.item.DiscountSetReq;
import com.canal.admin.transfer.req.item.ItemListConditions;
import com.canal.admin.transfer.req.item.ItemUpReq;
import com.canal.admin.transfer.resp.PageResp;
import com.canal.admin.transfer.resp.item.ChannelItemListResp;
import com.canal.admin.transfer.resp.item.ItemDetailResp;

import java.util.List;
import java.util.Map;

/**
 * @author yangbo
 * @date 2020-06-24 8:40
 */
public interface ZcolChannelItemService {

    /**
     * 条件搜索渠道号
     * @param conditions
     * @return
     */
    PageResp<ChannelItemListResp> list(ItemListConditions conditions);

    /**
     * 新增渠道号
     * @param addReq
     */
    void addItem(ChannelItemAddReq addReq) throws BuzException;

    /**
     * 折扣设置
     * @param setReq
     * @throws BuzException
     */
    void setDiscount(DiscountSetReq setReq) throws BuzException;

    /**
     * 设置进量状态
     * @param id
     * @throws BuzException
     */
    void setInputState(Integer id) throws BuzException;

    /**
     * 批量删除
     * @param ids
     * @return
     * @throws BuzException
     */
    List<Integer> batchDel(List<Integer> ids) throws BuzException;

    /**
     * 查询明细
     * @param id
     * @return
     */
    ItemDetailResp detail(Integer id);

    /**
     * 编辑渠道号
     * @param upReq
     * @throws BuzException
     */
    void update(ItemUpReq upReq) throws BuzException;

    /**
     * 搜索渠道
     * @param keyword
     * @return
     */
    List<Map<String,Object>> channelList(String keyword);

}
